﻿// --------------------------------------------------------------------------------------------------------------------
// <copyright file="CompositeQueryCondition.cs" company="CodePlex">
//   Copyright © CodePlex 2012
// </copyright>
// <summary>
//   Defines the CompositeQueryCondition type.
// </summary>
// --------------------------------------------------------------------------------------------------------------------

namespace DataFramework.QueryConditions
{
    using System.Collections.Generic;

    /// <summary>
    /// Object to represent a composite query condition that the Data Framework should model when a query is built.
    /// </summary>
    public class CompositeQueryCondition : BaseQueryCondition
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="CompositeQueryCondition"/> class.
        /// </summary>
        /// <param name="type">The type.</param>
        public CompositeQueryCondition(ConditionType type)
        {
            this.ConditionSet1 = new List<BaseQueryCondition>();
            this.ConditionSet2 = new List<BaseQueryCondition>();
            Type = type;
        }

        /// <summary>
        /// Gets or sets the condition set1.
        /// </summary>
        /// <value>The condition set1.</value>
        public IList<BaseQueryCondition> ConditionSet1 { get; protected set; }

        /// <summary>
        /// Gets or sets the condition set2.
        /// </summary>
        /// <value>The condition set2.</value>
        public IList<BaseQueryCondition> ConditionSet2 { get; protected set; }
    }
}